<template>
  <div class="app-container">
    <div style="text-align: center; padding: 10px 0px">{{name}}</div>
    <el-tabs v-model="activeName">
      <el-tab-pane label="基础信息" name="first">
        <first-tab v-if="activeName=='first'"></first-tab>
      </el-tab-pane>
      <el-tab-pane label="自定义字段" name="second" v-if="id">
        <second-tab v-if="activeName=='second'"></second-tab>
      </el-tab-pane>
      <el-tab-pane label="节点" name="third" v-if="id">
        <third-tab v-if="activeName=='third'"></third-tab>
      </el-tab-pane>
      <el-tab-pane label="按扭" name="fourth" v-if="id">
        <fourth-tab v-if="activeName=='fourth'"></fourth-tab>
      </el-tab-pane>
      <el-tab-pane label="流程图" name="fifth" v-if="id">
        <process
                v-if="activeName=='fifth'"
                :id="id"
        ></process>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import firstTab from "./tabs/firstTab";
import secondTab from "./tabs/secondTab";
import ThirdTab from "./tabs/thirdTab";
import FourthTab from "./tabs/fourthTab";
import Process from "../../../workManagement/components/process";
export default {
  components: {
    Process,
    FourthTab,
    ThirdTab,
    firstTab,
    secondTab
  },
  name: "detail",
  data() {
    return {
      activeName: "first",
      id: this.$route.query.id,
      name: this.$route.query.name
    };
  },
  mounted() {},
  watch: {},
  methods: {}
};
</script>

<style scoped>
.dialog-footer {
  display: flex;
  align-items: center;
  justify-content: center;
}
</style>
